package com.five.admin.dto;

import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

@Data
public class ProductEditDto {
    private Long id;
    @NotBlank(message = "商品名称不能为空")
    private String productName;

    @NotNull(message = "价格不能为空")
    @DecimalMin(value = "0.0", inclusive = false, message = "价格必须大于0")
    private BigDecimal price;

    @DecimalMin(value = "0.0", message = "原价不能为负数")
    private BigDecimal originalPrice;

    @NotNull(message = "库存数量不能为空")
    private Integer stockQuantity;

    @TableLogic(value = "1", delval = "0")
    private Integer productStatus = 1;

    @NotNull(message = "分类ID不能为空")
    private Long categoryId;

    @NotNull(message = "品牌ID不能为空")
    private Long brandId;

    private String description;

    private String image;

    private List<String> images;
}